Method and Apparatus of Matrix-Based Intra Prediction for Video Coding

ABSTRACT

According to one implementation, a method receives input data related to a current block in a current picture at a video encoder side or receiving a video bitstream comprising coded data of the current block at a video decoder side. When hen the MIP mode is applied to the current block, the method checks availability for a target reference boundary region comprising left reference boundary samples and top reference boundary samples, wherein the left reference boundary samples and the top reference boundary samples are checked jointly for the current block. The method further performs a padding process if an unavailable sample exists in the target reference boundary region, wherein the unavailable sample is padded with a default value or a sample value of an available sample and derives a reduced predictor, and encodes or decodes the current block using a MIP predictor derived from the reduced predictor.

CROSS REFERENCE TO RELATED APPLICATIONS

The present invention is a Continuation of pending U.S. patentapplication Ser. No. 17/249,665, filed on Mar. 9, 2021, which is aDivisional of pending U.S. patent application Ser. No. 16/895,073, filedon Jun. 8, 2020 (now U.S. Pat. No. 11,128,868, issued on Sep. 21, 2021),which claims priority to U.S. Provisional Patent Application, Ser. No.62/859,774, filed on Jun. 11, 2019. The U.S. Provisional PatentApplication is hereby incorporated by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to Intra prediction for video coding. Inparticular, the present invention relates to simplification ofMatrix-based Intra prediction mode and unification of the Matrix-basedIntra prediction mode and conventional Intra prediction mode.

BACKGROUND AND RELATED ART

High-Efficiency Video Coding (HEVC) is a new international video codingstandard developed by the Joint Collaborative Team on Video Coding(JCT-VC). HEVC is based on the hybrid block-based motion-compensatedDCT-like transform coding architecture. The basic unit for compression,termed coding unit (CU), is a 2N×2N square block, and each CU can berecursively split into four smaller CUs until the predefined minimumsize is reached. Each picture can be partitioned into multiple CTUs(Coding Tree Units) and each CTU is partitioned one or more CUs. Forcolor video data, each CU may comprise multiple Coding Blocks (CBs)corresponding to multiple color components. Each CU contains one ormultiple prediction units (PUs). For color video data, each PU maycomprise multiple Prediction Blocks (PBs) corresponding to multiplecolor components. To achieve the best coding efficiency of hybrid codingarchitecture in HEVC, there are two kinds of prediction modes (i.e.,Intra prediction and Inter prediction) for each PU. For Intra predictionmodes, the spatial neighboring reconstructed pixels can be used togenerate the directional predictions.

After the development of HEVC standard, another merging video codingstandard, named as Versatile Video Coding (VVC), is being developedunder Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 andISO/IEC JTC 1/SC 29/WG 11. Various new coding tools along with someexisting coding tools have been evaluated for VVC.

Like many video coding systems, the HEVC and VVC use adaptive Interprediction and Intra prediction. For the Intra prediction mode, HEVCuses DC mode, planar mode, and 33 directional modes. The directionalprediction modes are also referred as angular prediction modes. On theother hand, the VVC uses 67 Intra prediction modes including DC mode,planar mode and 65 directional Intra prediction modes.

A new type of Intra prediction, called Matrix-based Intra Prediction(MIP) has been introduced in JVET-N0217 (J. Pfaff et al., “CE3: Affinelinear weighted intra prediction (CE3-4.1, CE3-4.2)”, Joint VideoExperts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11,14th Meeting: Geneva, CH, 19-27 Mar. 2019, Document: JVET-N0217). WhileMIP has shown to improve coding performance, it also results inincreased system complexity. Therefore, it is desirable to developtechniques to simplify the system complexity for coding systemsincorporating MIP.

BRIEF SUMMARY OF THE INVENTION

A method and apparatus of video coding are disclosed. According to thismethod, input data related to a current block in a current picture arereceived at a video encoder side or a video bitstream comprising codeddata of the current block is received at a video decoder side. When theMIP mode is applied to the current block: availability for a targetreference boundary region comprising left reference boundary samples andtop reference boundary samples is checked, wherein the left referenceboundary samples and the top reference boundary samples are checkedjointly for the current block; a reduced predictor is derived, whereinthe deriving process comprises applying matrix multiplication on aboundary vector and adding an offset, and wherein the boundary vector isderived from the target reference boundary region, and wherein at leastone unavailable samples is padded if there exists any unavailable samplein the target reference boundary region; and the current block isencoded or decoded using a MIP predictor derived from the reducedpredictor.

In one embodiment, the availability for the target reference boundaryregion is checked from a bottom sample to a top sample of the leftreference boundary samples, then a top-left corner reference sample, andthen from a leftmost sample to a rightmost sample of the top referenceboundary samples. In one embodiment, if all reference samples in thetarget reference boundary region are not available, the target referenceboundary region is padded with a default value. In one embodiment, ifthere exist at least one available sample and at least one unavailablesample in the target reference boundary region, any unavailable sampleprior to a firstly available sample is padded using the firstlyavailable sample. Furthermore, a target unavailable sample after thefirstly available sample is padded using a last available sample checkedprior to the target unavailable sample. In one embodiment, the MIPpredictor is derived by applying transpose, up-sampling or both to thereduced predictor.

According to another method, target samples are derived from a targetreference boundary region comprising left reference boundary samples andtop reference boundary samples. A reduced predictor is derived, whereinthe deriving process comprises applying matrix multiplication on aboundary vector and adding an offset, and wherein the boundary vector isderived from the target reference boundary region. If current block sizeis larger than reduced predictor size: an up-sampled reduced predictorhaving the current block size is derived by applying horizontal andvertical bi-linear interpolation to the reduced predictor and selectedoriginal left reference boundary samples and selected original topreference boundary samples at specific positions; and the current blockis encoded or decoded using the up-sampled reduced predictor. In oneembodiment, the specific positions are dependent on width and height ofthe current block, length of the up-sampled the reduced predictor orboth.

According to yet another method, a target reference boundary regioncomprising left reference boundary samples and top reference boundarysamples is determined. A reduced predictor is derived, wherein thederiving process comprises applying matrix multiplication on a boundaryvector and adding an offset, and wherein the boundary vector is derivedfrom the target reference boundary region. The reduced predictor isup-sampled to a same size as the current block using horizontalinterpolation and vertical interpolation if the reduced predictor issmaller than the current block, wherein the horizontal interpolation andthe vertical interpolation are in a fixed order regardless of a shape ofthe current block, size of the current block or both. The current blockis encoded or decoded using the up-sampled reduced predictor

In one embodiment, the horizontal interpolation is always applied beforethe vertical interpolation. In another embodiment, the verticalinterpolation is always applied before the horizontal interpolation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example of top reference samples and leftreference samples that are used to derive matrix-based Intra predictor.

FIG. 2 illustrates an example of reference boundary samples that areused to derive matrix-based Intra predictor according to one embodimentof the present invention.

FIG. 3 illustrates a flowchart of an exemplary video coding usingmatrix-based Intra prediction according to an embodiment of the presentinvention, where the left reference boundary samples and the topreference boundary samples are checked jointly.

FIG. 4 illustrates a flowchart of an exemplary video coding usingmatrix-based Intra prediction according to an embodiment of the presentinvention, where selected original left reference boundary samples andselected original top reference boundary samples at specific positionsare used for predictor up-sampling.

FIG. 5 illustrates a flowchart of an exemplary video coding usingmatrix-based Intra prediction according to an embodiment of the presentinvention, where the horizontal interpolation and the verticalinterpolation are in a fixed order regardless of a shape of the currentblock, size of the current block or both.

DETAILED DESCRIPTION OF THE INVENTION

The following description is of the best-contemplated mode of carryingout the invention. This description is made for the purpose ofillustrating the general principles of the invention and should not betaken in a limiting sense. The scope of the invention is best determinedby reference to the appended claims.

Matrix-Based Intra Prediction (MIP)

The MIP is disclosed in JVET-N0217 and it was adopted by VVC Test Model5.0, VTM-5.0 (J. Chen, et al., “Algorithm description for VersatileVideo Coding and Test Model 5 (VTM 5)”, Joint Video Experts Team (JVET)of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 14th Meeting: Geneva,CH, 19-27 Mar. 2019, Document: JVET-N1002). For predicting the samplesof a rectangular block of width W and height H, MIP takes one line of Hreconstructed neighboring boundary samples located at the left side ofthe block and one line of W reconstructed neighboring boundary sampleslocated above the block as input.

The generation of the prediction signal is based on the following threesteps:

-   -   1. Derivation of the boundary samples: four samples in the case        of W=H=4 and eight samples in all other cases are extracted by        averaging the neighboring reference samples.    -   2. A matrix vector multiplication, followed by addition of an        offset, is carried out with the averaged samples as an input.        The result is a reduced prediction signal corresponding to a        subsampled set of samples in the original block.    -   3. The prediction signal at the remaining positions is generated        from the prediction signal corresponding to the subsampled set        using linear interpolation, which is a single-step linear        interpolation in each direction.

The matrices and offset vectors needed to generate the prediction signalare taken from three sets of matrices (S₀, S₁, S₂). Set S₀ consists of18 matrices, A₀ ^(i), i ∈ {0, . . . , 17} and 18 offset vectors b₀ ^(i),i ∈ {0, . . . , 17}. Each of the matrices has 16 rows and 4 columns andeach of vectors has a size of 16. Matrices and offset vectors of set S₀are used for blocks of size 4×4. Set S₁ consists of 10 matrices, A₁^(i), i ∈ {0, . . . , 9} and 10 offset vectors, b₁ ^(i), i ∈ {0, . . . ,9}. Each of the matrices has 16 rows and 8 columns and each of vectorshas a size of 16. Matrices and offset vectors of set Sore used forblocks of sizes 4×8, 8×4 and 8×8. Finally, set S₂ consists of 6matrices, A₂ ^(i), i ∈ {0, . . . , 5} and 6 offset vectors b₂ ^(i), i ∈{0, . . . , 5}. Each of matrices has 64 rows and 8 columns and each ofvectors has a size of 64. Matrices and offset vectors of set S₂ or partsof these matrices and offset vectors are used for all otherblock-shapes.

The total number of multiplications needed in the computation of thematrix vector product is always smaller than or equal to 4×W×H. In otherwords, at most four multiplications per sample are required for the MIPmodes. Detailed conventional MIP prediction derivation is described asfollows.

I. Averaging of the Boundary

In a first step, the input boundaries bdry^(top) (110) and bdry^(left)(120) for a current block (100) are reduced to smaller boundariesbdry_(red) ^(top) and bdry_(red) ^(left) as shown in FIG. 1 . Here,bdry_(red) ^(top) and bdry_(red) ^(left) both consist of 2 samples inthe case of a 4×4 block and both consist of 4 samples in all othercases.

If the block size is 4×4, for 0≤i<2, the top reduced boundaries aredefined as:

${{bdry}_{red}^{top}\lbrack i\rbrack} = {\left( {\left( {\sum\limits_{j = 0}^{1}{{bdry}^{top}\left\lbrack {{i \cdot 2} + j} \right\rbrack}} \right) + 1} \right)\operatorname{>>}1.}$

The left reduced boundaries, bdry_(red) ^(left) can be definedsimilarly.

Otherwise, if the block width W is given as W=4·2^(k), for 0≤i<4, thetop reduced boundaries are defined as:

${{bdry}_{red}^{top}\lbrack i\rbrack} = {\left( {\left( {\sum\limits_{j = 0}^{2^{k} - 1}{{bdry}^{top}\left\lbrack {{i \cdot 2^{k}} + j} \right\rbrack}} \right) + \left( {1\operatorname{<<}\left( {k - 1} \right)} \right)} \right)\operatorname{>>}{k.}}$

The left reduced boundaries, bdry_(red) ^(left) can be definedsimilarly.

The two reduced boundaries bdry_(red) ^(top) and bdry_(red) ^(left) areconcatenated to a reduced boundary vector bdry_(red), which is thus ofsize four for blocks of shape 4×4 and of size eight for blocks of allother shapes. If mode refers to the MIP mode, this concatenation isdefined as follows:

${bdry}_{red} = \left\{ \begin{matrix}\left\lbrack {{bdry}_{red}^{top},{bdry}_{red}^{left}} \right\rbrack & {{{for}W} = {H = {{4{and}{mode}} < 18}}} \\\left\lbrack {{bdry}_{red}^{left},{bdry}_{red}^{top}} \right\rbrack & {{{for}W} = {H = {{4{and}{mode}} \geq 18}}} \\\left\lbrack {{bdry}_{red}^{top},{bdry}_{red}^{left}} \right\rbrack & {{{for}{\max\left( {W,H} \right)}} = {{8{and}{mode}} < 10}} \\\left\lbrack {{bdry}_{red}^{left},{bdry}_{red}^{top}} \right\rbrack & {{{for}\max\left( {W,H} \right)} = {{8{and}{mode}} \geq 10}} \\\left\lbrack {{bdry}_{red}^{top},{bdry}_{red}^{left}} \right\rbrack & {{{for}{\max\left( {W,H} \right)}} > {8{and}{mode}} < 6} \\\left\lbrack {{bdry}_{red}^{left},{bdry}_{red}^{top}} \right\rbrack & {{{for}{\max\left( {W,H} \right)}} > {8{and}{mode}} \geq 6.}\end{matrix} \right.$

Finally, for large blocks, the subsampled prediction signal isinterpolated using a second version of the averaged boundary. Namely, ifmin(W, H)>8 and W≥H, and where W=8*2^(l), the top boundaries are derivedfor 0≤i<8 according to:

${{bdry}_{redII}^{top}\lbrack i\rbrack} = {\left( {\left( {\sum\limits_{j = 0}^{2^{l} - 1}{{bdry}^{top}\left\lbrack {{i \cdot 2^{l}} + j} \right\rbrack}} \right) + \left( {1\operatorname{<<}\left( {l - 1} \right)} \right)} \right)\operatorname{>>}{l.}}$

If min(W, H)>8 and H>W, the left reduced boundaries, bdry_(red) ^(left)can be defined similarly.

II. Generation of the Reduced Prediction Signal by Matrix VectorMultiplication

A reduced prediction signal pred_(red) is generated based on the reducedinput vector bdry_(red). The reduced prediction signal corresponds tothe down-sampled block of width W_(red) and height H_(red). Here,W_(red) and H_(red) are defined as:

$W_{red} = \left\{ {\begin{matrix}4 & {{{for}{\max\left( {W,H} \right)}} \leq 8} \\{\min\left( {W,8} \right)} & {{{for}{\max\left( {W,H} \right)}} > 8}\end{matrix},{H_{red} = \left\{ {\begin{matrix}4 & {{{for}{\max\left( {W,H} \right)}} \leq 8} \\{,{\min\left( {H,8} \right)}} & {{{for}{\max\left( {W,H} \right)}} > 8}\end{matrix}.} \right.}} \right.$

The reduced prediction signal pred_(red) is computed by calculating amatrix vector product and adding an offset:

pred_(red) =A·bdry _(red) +b.

In the above equation, A is a matrix with W_(red)×H_(red) rows and 4columns for W=H=4, and 8 columns for all other cases. b is a vector ofsize W_(red)×H_(red).

The matrix A and the vector b are taken from one of the sets S₀, S₁, S₂as follows. An index idx=idx(W, H) is defined as follows:

${{idx}\left( {W,H} \right)} = \left\{ \begin{matrix}0 & {{{for}W} = {H = 4}} \\1 & {{{for}{\max\left( {W,H} \right)}} = 8} \\2 & {{{for}{\max\left( {W,H} \right)}} > 8.}\end{matrix} \right.$

Moreover, a parameter m is defined as follows:

$m = \left\{ \begin{matrix}{mode} & {{{for}W} = {H = {{4{and}{mode}} < 18}}} \\{{mode} - 17} & {{{for}W} = {H = {{4{and}{mode}} \geq 18}}} \\{mode} & {{{for}\max\left( {W,H} \right)} = {{8{and}{mode}} < 10}} \\{{mode} - 9} & {{{for}\max\left( {W,H} \right)} = {{8{and}{mode}} \geq 10}} \\{mode} & {{{for}\max\left( {W,H} \right)} > {8{and}{mode}} < 6} \\{{mode} - 5} & {{{for}\max\left( {W,H} \right)} > {8{and}{mode}} \geq 6.}\end{matrix} \right.$

Then, if idx≤1, or idx=2 and min(W, H)>4, A is set as A=A_(idx) ^(m) andb is set as b=b_(idx) ^(m). In the case that idx=2 and min(W, H)=4, A isset to be the matrix that arises by leaving out every other row ofA_(idx) ^(m) in the case W=4, and A corresponds to an odd x-coordinatein the down-sampled block. In the case of H=4, A corresponds to an oddy-coordinate in the down-sampled block.

Finally, the reduced prediction signal is replaced by its transpose inthe following cases:

W=H=4and mode≥18

max(W, H)=8 and mode≥10

max(W, H)>8 and mode≥6

The number of multiplications required for calculation of pred_(pred) is4 in the case of W=H=4 since A has 4 columns and 16 rows in this case.In all other cases, A has 8 columns and W_(red)×H_(red) rows. It can beverified that 8×W_(red)×H_(red)≤4×W×H multiplications are required inthese cases. In other words, at most 4 multiplications per sample areneeded to compute pred_(red) in these cases.

Single Step Linear Interpolation

For a W×H block with max(W, H)≥8, the prediction signal is derived fromthe reduced prediction signal pred_(red) with a block sizeW_(red)×H_(red) by linear interpolation. Depending on the block shape,linear interpolation is done in vertical, horizontal or both directions.If linear interpolation is to be applied in both directions, it is firstapplied in horizontal direction if W<H, and it is first applied invertical direction, otherwise.

Consider, without loss of generality, the case for a W×H block withmax(W, H)≥8 and W≥H. Then, the one-dimensional linear interpolation isperformed as follows. Without loss of generality, it suffices todescribe linear interpolation in vertical direction. First, the reducedprediction signal is extended to the top using the boundary signal. Thevertical up-sampling factor U_(ver) is defined as U_(ver)=H/H_(red) andis further represented as U_(ver)=2^(u) ^(ver) >1. The extended reducedprediction signal is defined by:

${{{pred}_{red}\lbrack x\rbrack}\left\lbrack {- 1} \right\rbrack} = \left\{ \begin{matrix}{{bdry}_{red}^{top}\lbrack x\rbrack} & {{{for}W} = 8} \\{{bdry}_{redII}^{top}\lbrack x\rbrack} & {{{for}W} > 8.}\end{matrix} \right.$

As shown in the above equation, the reduced boundary samples are alsoused as the extended reduced prediction signal and then, from thisextended reduced prediction signal, the vertically linear interpolatedprediction signal is generated as:

${{{pred}_{red}^{{ups},{ver}}\lbrack x\rbrack}\left\lbrack {{U_{ver} \cdot y} + k} \right\rbrack} = {\left( {{\left( {U_{ver} - k - 1} \right) \cdot {{{pred}_{red}\lbrack x\rbrack}\left\lbrack {y - 1} \right\rbrack}} + {\left( {k + 1} \right) \cdot {{{pred}_{red}\lbrack x\rbrack}\lbrack y\rbrack}} + \frac{U_{ver}}{2}} \right)\operatorname{>>}u_{ver}}$for0 ≤ x < W_(red), 0 ≤ y < H_(red)and0 ≤ k < U_(ver).

Proposed Method 1—Boundary Reference Sample Derivation

In the WET-N0217, the availability checks of the reference samples alongthe left boundary and top boundary are checked separately. The checks ofthe left boundary samples are done from top to bottom, and the checks ofthe top boundary samples are done from left to right. For the leftreference boundary samples, if all of them are not available, a defaultvalue will be used to fill the left reference boundary samples. For thetop boundary reference samples, if all of them are not available, adefault value will be used to fill the top reference boundary samples.

For both left and top boundary reference samples, if they are partiallyavailable, the unavailable samples will be padded using the lastavailable sample checked before.

The conventional MIP uses different availability checking and padding ofunavailable samples from the regular Intra prediction. In order tosimplify system complexity, a method to harmonize the availabilitychecks and reference sample padding process between the regular Intraprediction mode and the MIP mode is disclosed. For example, theavailability of the left and top boundary reference samples can bechecked together according to the present invention. All of the topboundary and left boundary reference samples will be checked one by one.In one embodiment, the checking order is the left boundary referencesamples (from the bottom sample to the top sample) first, then thetop-left corner sample, and then the top boundary reference samples(from the leftmost sample to the rightmost sample) as shown in FIG. 2 .In the example of FIG. 2 , the reference boundary samples 210 includethe left boundary samples, the top-left corner sample and the topboundary samples.

If all of the reference samples are not available, a default value willbe used to fill the left reference boundary samples, top-left cornersample, and the top reference boundary samples; otherwise, the referencesamples checked before the first available sample will be padded usingthe first available sample. For other unavailable samples, they will bepadded with the last available sample checked prior to a currentunavailable sample.

Proposed Method 2—Reference Sample Derivation for Up-Sampling

In JVET-0217, if the size of the reference samples of the left/topboundary for predictor up-sampling is not equal to the height/width ofthe current block, the left/top boundary reference samples will bedown-sampled to the target size (for predictor up-sampling). And then,if the size of the left/top boundary for matrix multiplication is notequal to the size of the left/top boundary for predictor up-sampling,the left/top boundary reference samples for predictor up-sampling willbe further down-sampled to the target size (for matrix multiplication).Therefore, in the worst case, there will be two-stage down-samplingduring preparing the boundary reference samples for a MIP coded block.

In the proposed method, the reference samples used for predictorup-sampling corresponds to the original reference sample in specificpositions. Therefore, there is no need to apply down-sampling whenpreparing the reference boundary samples for predictor to be up-sampled.In one embodiment, the position depends on the scaling factor betweenthe width/height of the current block and the length (e.g.upSamplingSize) for predictor up-sampling at top/left boundary. Thescaling factor is equal to block_width/upSampling_top for top boundary,and equal to block_height/upSampling_left for left boundary. For bothboundaries, the index of the reference samples for predictor up-samplingis equal to scalingFactor*(i+1)−1, where i=0 . . . upSamplingSize−1. Inother words, for X equal to Top or Left and i=0 . . . upSamplingSize−1:

ti upSampling_ref_X[i]=org_ref_X[scalingFactor*(i+1)−1].

Proposed Method 3—Reference Sample for Matrix Multiplication

In one embodiment, the reference samples for matrix multiplication areoriginal samples instead of samples derived by down-sampling theboundary reference samples.

The reference samples for matrix multiplication correspond to theoriginal reference sample in specific positions according to theembodiment. There is no need to apply down-sampling when preparing thereference boundary samples for matrix multiplication. In one embodiment,the position depends on the scaling factor between the width/height ofthe current block and the length (e.g. matrixMultSize) for matrixmultiplication at top/left boundary. The scaling factor is equal toblock_width/matrixMult_top for the top boundary, and equal toblock_height/matrixMult_left for the left boundary. For both boundaries,the index of the reference samples for predictor up-sampling is equal toscalingFactor*(i+1)−1, where i=0 . . . matrixMultSize−1.

In other words, for X equal to Top or Left nd i=0 . . .matrixMultSize−1:

matrixMult_ref_X[i]=org_ref_X[scalingFactor*(i+1)−1].

Proposed Method 4—combination of Method 3 and Method 2

After combining Method 3 and Method 2, the down-sampling process can beremove from the MIP mode. Both the reference samples for predictorup-sampling and matrix multiplication are derived using the originalreference samples.

In one embodiment, a smoothing filter is first applied to the boundaryreference samples. In one embodiment, the filter is a filter with [1 21] coefficients.

Proposed Method 5—Fixed Order Up-Sampling

In JVET-N0217, the 1D up-sampling is applied to the shorter side first.For example, if the block width is less than the block height,horizontal up-sampling is applied first; otherwise, the verticalup-sampling is applied first.

In the proposed method, the order of the up-sampling is fixed. In oneembodiment, horizontal up-sampling is always applied first. In anotherembodiment, vertical up-sampling is always applied first.

Proposed Method 6—MPM Derivation

In JVET-N0217, for blocks using regular Intra prediction mode, if theneighboring block is MIP coded, the MIP mode index will be mapped to aregular Intra mode index. Similarly, for chroma Intra blocks, if thereferenced luma block is MIP coded, the MIP mode index will be mapped toa regular Intra mode index. For blocks using MIP mode, if the referencedblock is a regular Intra mode index, the regular Intra mode index willbe mapped to a MIP mode index. If the neighboring block is MIP mode, andthe MipSizeId of the current block and neighboring block are not thesame, then the reference Intra prediction mode is unavailable.Otherwise, the reference Intra prediction mode index is equal to the MIPmode index of the neighboring block. The MipSizeId is derived accordingto the width and height of the block.

In the proposed method, all Intra modes are mapped to the regular Intramode index and stored for referencing by other blocks. In other words,for blocks coded in Intra prediction mode or for chroma Intra blocks,the reference luma Intra prediction mode index is always a regular Intramode index. If the current block is MIP coded, the referenced regularIntra prediction mode will be mapped to a MIP mode index.

In one embodiment, the MPM list derivation of a MIP coded block is firstderived using the regular Intra prediction mode, and then mapped themode indexes of all the MPM candidates into MIP mode indexes in thefinal stage.

In another embodiment, the referenced regular Intra prediction mode isfirst mapped to a MIP mode index, and then the MPM list is derived usingthe MIP mode index.

In another embodiment, the MPM list of the MIP mode is a subset of the sMPM list of the regular Intra mode, and all of the candidates in thesubset will be mapped to MIP mode indexes when adding them into MPM listof the MIP mode.

Any of the foregoing proposed methods can be implemented in encodersand/or decoders. For example, any of the proposed methods can beimplemented in an Intra-prediction module of an encoder, and/or anIntra-prediction module of a decoder. Alternatively, any of the proposedmethods can be implemented as a circuit coupled to the Intra-predictionmodule of the encoder and/or the Intra-prediction module of the decoder,so as to provide the information needed by the reshape module or theresidual scaling/reshape module.

Video encoders have to follow the foregoing syntax design so as togenerate the legal bitstream, and video decoders are able to decode thebitstream correctly only if the parsing process is complied with theforegoing syntax design. When the syntax is skipped in the bitstream,encoders and decoders should set the syntax value as the inferred valueto guarantee the encoding and decoding results are matched.

FIG. 3 illustrates a flowchart of an exemplary video coding usingmatrix-based Intra prediction according to an embodiment of the presentinvention, where the left reference boundary samples and the topreference boundary samples are checked jointly. The steps shown in theflowchart, as well as other following flowcharts in this disclosure, maybe implemented as program codes executable on one or more processors(e.g., one or more CPUs) at the encoder side and/or the decoder side.The steps shown in the flowchart may also be implemented based hardwaresuch as one or more electronic devices or processors arranged to performthe steps in the flowchart. According to this method, input data relatedto a current block in a current picture are received at a video encoderside or a video bitstream corresponding to compressed data including acurrent luma block in a current picture is received at a video decoderside in step 310. Whether the MIP mode is applied to the current blockis checked in step 320. If the MIP mode is applied to the current block(i.e., the “Yes” path from step 320), steps 330 through 350 areperformed. Otherwise (i.e., the “No” path from step 320), steps 330through 350 are skipped. In step 330, the availability for a targetreference boundary region comprising left reference boundary samples andtop reference boundary samples is checked, wherein the left referenceboundary samples and the top reference boundary samples are checkedjointly for the current block. In step 340, a reduced predictor isderived, wherein said deriving the reduced predictor comprises applyingmatrix multiplication on a boundary vector and adding an offset, whereinthe boundary vector is derived from the target reference boundaryregion, and wherein at least one unavailable samples is padded if thereexists any unavailable sample in the target reference boundary region.In step 350, the current block is encoded or decoded using a MIPpredictor derived from the reduced predictor.

FIG. 4 illustrates a flowchart of an exemplary video coding usingmatrix-based Intra prediction according to an embodiment of the presentinvention, where selected original left reference boundary samples andselected original top reference boundary samples at specific positionsare used for predictor up-sampling. According to this method, input datarelated to a current block in a current picture are received at a videoencoder side or a video bitstream corresponding to compressed dataincluding a current luma block in a current picture is received at avideo decoder side in step 410. Target samples are derived from a targetreference boundary region comprising left reference boundary samples andtop reference boundary samples in step 420. A reduced predictor isderived in step 430, wherein said deriving the reduced predictorcomprises applying matrix multiplication on a boundary vector and addingan offset, and wherein the boundary vector is derived from the targetreference boundary region. Whether current block size is larger thanreduced predictor size is checked in step 440. If the current block sizeis larger than the reduced predictor size (i.e., the “Yes” path fromstep 440), steps 450 and 460 are performed. Otherwise (i.e., the “No”path from step 440), steps 450 through 460 are skipped. In step 450, anup-sampled reduced predictor having the current block size is generatedby applying horizontal and vertical bi-linear interpolation to thereduced predictor and selected original left reference boundary samplesand selected original top reference boundary samples at specificpositions. In step 460, the current block is encoded or decoded using aMIP predictor derived from the reduced predictor.

FIG. 5 illustrates a flowchart of an exemplary video coding usingmatrix-based Intra prediction according to an embodiment of the presentinvention, where the horizontal interpolation and the verticalinterpolation are in a fixed order regardless of a shape of the currentblock, size of the current block or both. According to this method,input data related to a current block in a current picture are receivedat a video encoder side or a video bitstream corresponding to compresseddata including a current luma block in a current picture is received ata video decoder side in step 510. A target reference boundary regioncomprising left reference boundary samples and top reference boundarysamples is determined in step 520. A reduced predictor is derived instep 530, wherein a process to derive the reduced predictor comprisesapply matrix multiplication on a boundary vector and adding an offset,and wherein the boundary vector is derived from the target referenceboundary region. The reduced predictor is up-sampled to a same size asthe current block using horizontal interpolation and verticalinterpolation if the reduced predictor is smaller than the current blockin step 540, wherein the horizontal interpolation and the verticalinterpolation are in a fixed order regardless of a shape of the currentblock, size of the current block or both. In step 550, the current blockis encoded or decoded using a MIP predictor derived from the reducedpredictor.

The flowcharts shown are intended to illustrate examples of video codingaccording to the present invention. A person skilled in the art maymodify each step, re-arranges the steps, split a step, or combine stepsto practice the present invention without departing from the spirit ofthe present invention. In the disclosure, specific syntax and semanticshave been used to illustrate examples to implement embodiments of thepresent invention. A skilled person may practice the present inventionby substituting the syntax and semantics with equivalent syntax andsemantics without departing from the spirit of the present invention.

The above description is presented to enable a person of ordinary skillin the art to practice the present invention as provided in the contextof a particular application and its requirement. Various modificationsto the described embodiments will be apparent to those with skill in theart, and the general principles defined herein may be applied to otherembodiments. Therefore, the present invention is not intended to belimited to the particular embodiments shown and described, but is to beaccorded the widest scope consistent with the principles and novelfeatures herein disclosed. In the above detailed description, variousspecific details are illustrated in order to provide a thoroughunderstanding of the present invention. Nevertheless, it will beunderstood by those skilled in the art that the present invention may bepracticed.

Embodiment of the present invention as described above may beimplemented in various hardware, software codes, or a combination ofboth. For example, an embodiment of the present invention can be one ormore circuit circuits integrated into a video compression chip orprogram code integrated into video compression software to perform theprocessing described herein. An embodiment of the present invention mayalso be program code to be executed on a Digital Signal Processor (DSP)to perform the processing described herein. The invention may alsoinvolve a number of functions to be performed by a computer processor, adigital signal processor, a microprocessor, or field programmable gatearray (FPGA). These processors can be configured to perform particulartasks according to the invention, by executing machine-readable softwarecode or firmware code that defines the particular methods embodied bythe invention. The software code or firmware code may be developed indifferent programming languages and different formats or styles. Thesoftware code may also be compiled for different target platforms.However, different code formats, styles and languages of software codesand other means of configuring code to perform the tasks in accordancewith the invention will not depart from the spirit and scope of theinvention.

The invention may be embodied in other specific forms without departingfrom its spirit or essential characteristics. The described examples areto be considered in all respects only as illustrative and notrestrictive. The scope of the invention is therefore, indicated by theappended claims rather than by the foregoing description. All changeswhich come within the meaning and range of equivalency of the claims areto be embraced within their scope.

1. A method of video coding using a Matrix-based Intra Prediction (MIP)mode, the method comprising: receiving input data related to a currentblock in a current picture at a video encoder side or receiving a videobitstream comprising coded data of the current block at a video decoderside; when the MIP mode is applied to the current block: checkingavailability for a target reference boundary region comprising leftreference boundary samples and top reference boundary samples, whereinthe left reference boundary samples and the top reference boundarysamples are checked jointly for the current block; performing a paddingprocess if an unavailable sample exists in the target reference boundaryregion, wherein the unavailable sample is padded with a default value ora sample value of an available sample; deriving a reduced predictor,wherein said deriving the reduced predictor comprises applying matrixmultiplication on a boundary vector and adding an offset, wherein theboundary vector is derived from the target reference boundary region;and encoding or decoding the current block using a MIP predictor derivedfrom the reduced predictor.
 2. The method of claim 1, wherein theavailability for the target reference boundary region is checked from abottom sample to a top sample of the left reference boundary samples,then a top-left corner reference sample, and then from a leftmost sampleto a rightmost sample of the top reference boundary samples.
 3. Themethod of claim 1, wherein if all reference samples in the targetreference boundary region are not available, the target referenceboundary region is padded with the default value.
 4. The method of claim1, wherein if there exist at least one available sample and at least oneunavailable sample in the target reference boundary region, anyunavailable sample prior to a firstly available sample is padded usingthe firstly available sample.
 5. The method of claim 4, wherein a targetunavailable sample after the firstly available sample is padded using alast available sample checked prior to the target unavailable sample. 6.The method of claim 1, wherein the MIP predictor is derived by applyingtranspose, up-sampling or both to the reduced predictor.
 7. An apparatusof video coding using a Matrix-based Intra Prediction (MIP) mode, theapparatus of video coding comprising one or more electronic circuits orprocessors arranged to: receive input data related to a current block ina current picture at a video encoder side or receive a video bitstreamcomprising coded data of the current block at a video decoder side; whenthe MIP mode is applied to the current block: check availability for atarget reference boundary region comprising left reference boundarysamples and top reference boundary samples, wherein the left referenceboundary samples and the top reference boundary samples are checkedjointly for the current block; perform a padding process if anunavailable sample exists in the target reference boundary region,wherein the unavailable sample is padded with a default value or asample value of an available sample; derive a reduced predictor, whereina process to derive the reduced predictor comprises to apply matrixmultiplication on a boundary vector and to add an offset, wherein theboundary vector is derived from the target reference boundary region;and encode or decode the current block using a MIP predictor derivedfrom the reduced predictor.